﻿using System.Web.Mvc;

namespace MvcTemplates
{
    public class DropDownAttribute : MetadataAttribute
    {
        public DropDownAttribute( string optionsViewDataKey )
        {
            OptionsViewDataKey = optionsViewDataKey;
        }

        public string OptionsViewDataKey { get; private set; }

        public override void Process( ModelMetadata modelMetadata )
        {
            modelMetadata.TemplateHint = "DropDownFromViewData";
        }
    }
}